---
layout: "default"
title: "dump"
description: "Swift documentation for 'dump': Dump an object&#39;s contents using its mirror to standard output."
keywords: "dump,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-dump-t_-t-name_-string-indent_-int-maxdepth_-int-maxitems_-int">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-dump-t_-t-name_-string-indent_-int-maxdepth_-int-maxitems_-int">func dump&lt;T&gt;(<wbr>_:<wbr> T, name:<wbr> String?, indent:<wbr> Int, maxDepth:<wbr> Int, maxItems: Int)</a>
        
<div class="comment collapse" id="comment-func-dump-t_-t-name_-string-indent_-int-maxdepth_-int-maxitems_-int"><div class="p">
    <p>Dump an object&#39;s contents using its mirror to standard output.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func dump&lt;T&gt;(x: T, name: String? = default, indent: Int = default, maxDepth: Int = default, maxItems: Int = default) -&gt; T</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-dump-t-targetstream_-outputstreamtype_-t-inout_-targetstream-name_-string-indent_-int-maxdepth_-int-maxitems_-int">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-dump-t-targetstream_-outputstreamtype_-t-inout_-targetstream-name_-string-indent_-int-maxdepth_-int-maxitems_-int">func <wbr>dump&lt;T, TargetStream : OutputStreamType&gt;(<wbr>_:<wbr> T, inout:<wbr> TargetStream, name:<wbr> String?, indent:<wbr> Int, maxDepth:<wbr> Int, maxItems: Int)</a>
        
<div class="comment collapse" id="comment-func-dump-t-targetstream_-outputstreamtype_-t-inout_-targetstream-name_-string-indent_-int-maxdepth_-int-maxitems_-int"><div class="p">
    <p>Dump an object&#39;s contents using its mirror to the specified output stream.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func dump&lt;T, TargetStream : OutputStreamType&gt;(x: T, inout targetStream: TargetStream, name: String? = default, indent: Int = default, maxDepth: Int = default, maxItems: Int = default) -&gt; T</code>
    
    
</div></div>
</div>
